package com.zhangxi.vo;

import com.zhangxi.entity.DishFlavor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * ClassName: DishVo
 * Package: com.zhangxi.vo
 */
@Data // 是@ToString, @EqualsAndHashCode, @Getter, @Setter和@NoArgsConstructor的结合
@Builder //让实体类使用构造者模式创建对象
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "餐品返回的数据格式")
public class DishVo implements Serializable {
    @ApiModelProperty("id")
    private Long id ;
    @ApiModelProperty("菜品名称")
    private String name;
    @ApiModelProperty("菜品分类Id")
    private Long categoryId;
    @ApiModelProperty("价格")
    private BigDecimal price;
    //图片
    @ApiModelProperty("图片")
    private String image;
    //描述信息
    @ApiModelProperty("描述信息")
    private String description;
    //0 停售 1 起售
    @ApiModelProperty("状态")
    private Integer status;
    //更新时间
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
    //分类名称
    @ApiModelProperty("分类名称")
    private String categoryName;
    //菜品关联的口味
    @ApiModelProperty("菜品关联的口味")
    private List<DishFlavor> flavors = new ArrayList<>();

}
